<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /*（3）利用浮动的方式，左右两栏设置固定大小，并设置对应方向的浮动。中间一栏设置左右两个方向的margin值，注意这种方式，中间一栏必须放到最后。*/
    .outer {
      height: 100px;
      background-color: pink;
    }

    .left {
      float: left;
      width: 100px;
      height: 100px;
      background-color: tomato;
    }

    .right {
      float: right;
      width: 200px;
      height: 100px;
      background-color: gold
    }

    .middle {
      margin: 0 200px 0 100px;
      height: 100px;
      background-color: lightgreen;
    }
  </style>
</head>

<body>
  <div class="outer ">
    <div class="left">left</div>
    <div class="right">right</div>
    <!-- 这里要放在最后 -->
    <div class="middle">middle</div>
  </div>
</body>

</html>